home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995…tember: Reference Library / Dev.CD Sep 95 RL / Dev.CD Sep 95 RL.toast / mac / Technical Documentation / develop / develop Issue 12 code / Components / Headers / NuMathComponentPrivate.h < prev   
Encoding:
Text File  |  1994-12-02  |  3.5 KB  |  134 lines  |  [TEXT/MMCC]

  1. /*
  2.     File:        NuMathComponentPrivate.h
  3.  
  4.     Contains:    Private header file for NuMath component routines.
  5.  
  6.     Written by:    Gary Woodcock
  7.  
  8.     Copyright:    © 1992 by Apple Computer, Inc.
  9.  
  10.     Change History (most recent first):
  11.  
  12. */
  13.  
  14. //-----------------------------------------------------------------------
  15. // Includes
  16.  
  17. #ifndef    _NUMATHCOMPONENTPRIVATE_
  18. #define    _NUMATHCOMPONENTPRIVATE_
  19.  
  20. #include <QuickTimeComponents.h>
  21.  
  22. //-----------------------------------------------------------------------
  23. // The following is defined in the PPC InterfaceLib but was left out of the 
  24. // latest headers!
  25.  
  26. extern UniversalProcPtr CallComponentUPP;
  27.  
  28. //-----------------------------------------------------------------------
  29. // Private constants
  30.  
  31. // Maximum number of instances that can be opened
  32. enum
  33. {
  34.     kMaxNuMathInstances = 1    
  35. };
  36.  
  37. // Component and interface revision levels
  38. enum
  39. {
  40.     nuMathInterfaceRevision = 0x00010001    
  41. };
  42.  
  43.  
  44. //-----------------------------------------------------------------------
  45. // Private prototypes
  46.  
  47. #ifdef DEBUG_IT
  48.  
  49. // Only need this prototype if we're running linked (for debugging)
  50. pascal    ComponentResult    NuMathDispatcher    (ComponentParameters    *params,
  51.                                              Handle                    storage);
  52.  
  53. #endif DEBUG_IT
  54.                                              
  55. pascal    ComponentResult    NuMathOpen            (ComponentInstance        self);
  56.  
  57. pascal    ComponentResult    NuMathClose            (Handle                    storage,
  58.                                              ComponentInstance        self);
  59.  
  60. pascal    ComponentResult    NuMathCanDo            (short                    selector);
  61.  
  62. pascal    ComponentResult    NuMathVersion        (void);
  63.  
  64. pascal    ComponentResult    NuMathRegister        (void);
  65.     
  66. pascal    ComponentResult    NuMathDoDivide        (short                    numerator,
  67.                                              short                    denominator,
  68.                                              short                    *quotient);
  69.                                              
  70. pascal    ComponentResult    NuMathDoMultiply    (Handle                    storage,
  71.                                               short                    firstNum,
  72.                                              short                    secondNum,
  73.                                              short                    *multiplicationResult);
  74.  
  75. //-----------------------------------------------------------------------
  76.  
  77. enum {
  78.     uppNuMathOpenProcInfo = kPascalStackBased
  79.          | RESULT_SIZE(SIZE_CODE(sizeof(ComponentResult)))
  80.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(ComponentInstance)))
  81. };
  82.  
  83. enum {
  84.     uppNuMathCloseProcInfo = kPascalStackBased
  85.          | RESULT_SIZE(SIZE_CODE(sizeof(ComponentResult)))
  86.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(Handle)))
  87.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(ComponentInstance)))
  88. };
  89.  
  90.  
  91. enum {
  92.     uppNuMathCanDoProcInfo = kPascalStackBased
  93.          | RESULT_SIZE(SIZE_CODE(sizeof(ComponentResult)))
  94.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(short)))
  95. };
  96.  
  97.  
  98. enum {
  99.     uppNuMathVersionProcInfo = kPascalStackBased
  100.          | RESULT_SIZE(SIZE_CODE(sizeof(ComponentResult)))
  101. };
  102.  
  103. enum {
  104.     uppNuMathRegisterProcInfo = kPascalStackBased
  105.          | RESULT_SIZE(SIZE_CODE(sizeof(ComponentResult)))
  106. };
  107.  
  108.  
  109. enum {
  110.     uppNuMathDoDivideProcInfo = kPascalStackBased
  111.          | RESULT_SIZE(SIZE_CODE(sizeof(ComponentResult)))
  112.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(short)))
  113.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(short)))
  114.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(short*)))
  115. };
  116.  
  117. enum {
  118.     uppNuMathDoMultiplyProcInfo = kPascalStackBased
  119.          | RESULT_SIZE(SIZE_CODE(sizeof(ComponentResult)))
  120.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(Handle)))
  121.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(short)))
  122.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(short)))
  123.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(short*)))
  124. };
  125.  
  126.  
  127.  
  128.  
  129. //-----------------------------------------------------------------------
  130.  
  131. #endif    _NUMATHCOMPONENTPRIVATE_
  132.  
  133. //-----------------------------------------------------------------------
  134.